<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config = array(
	'teknisi' => array(
					array(
							'field' => 'nama',
							'label' => 'Nama',
							'rules' => 'trim|required'
						 ),
					array(
							'field' => 'username',
							'label' => 'ID',
							'rules' => 'trim|unique[models\Teknisi.username]'
						 ),
					array(
							'field' => 'email',
							'label' => 'Email',
							'rules' => 'trim|required|valid_email|unique[models\Akun.email]'
						 ),
					array(
							'field' => 'telepon',
							'label' => 'Telepon',
							'rules' => 'numeric'
						 ),
					),
	'teknisi_update' => array(
					array(
							'field' => 'nama',
							'label' => 'Nama',
							'rules' => 'trim|required'
						 ),
					array(
							'field' => 'username',
							'label' => 'ID',
							'rules' => 'trim|required|numeric|unique_update[models\Teknisi.username]'
						 ),
					array(
							'field' => 'email',
							'label' => 'Email',
							'rules' => 'trim|required|valid_email|unique_update[models\Akun.email]'
						 ),
					array(
							'field' => 'telepon',
							'label' => 'Telepon',
							'rules' => 'numeric'
						 ),
					),
	'speedy' => array(
					array(
							'field' => 'nama',
							'label' => 'Nama',
							'rules' => 'trim|required'
						 ),
					array(
							'field' => 'telepon',
							'label' => 'Telepon',
							'rules' => 'numeric'
						 ),
					),
	'agen' => array(
					array(
							'field' => 'username',
							'label' => 'ID',
							'rules' => 'trim|numeric|unique[models\Agen.username]'
						 ),
					array(
							'field' => 'nama',
							'label' => 'Nama',
							'rules' => 'trim|required'
						 ),
					array(
							'field' => 'email',
							'label' => 'Email',
							'rules' => 'trim|required|valid_email|unique[models\Akun.email]'
						 ),
					array(
							'field' => 'telepon',
							'label' => 'Telepon',
							'rules' => 'numeric'
						 ),
					),
	'agen_update' => array(
					array(
							'field' => 'nama',
							'label' => 'Nama',
							'rules' => 'trim|required'
						 ),
					array(
							'field' => 'username',
							'label' => 'ID',
							'rules' => 'trim|required|numeric|unique_update[models\Agen.username]'
						 ),
					array(
							'field' => 'email',
							'label' => 'Email',
							'rules' => 'trim|required|valid_email|unique_update[models\Akun.email]'
						 ),
					array(
							'field' => 'telepon',
							'label' => 'Telepon',
							'rules' => 'numeric'
						 ),
					),
	'pelanggan' => array(
					array(
							'field' => 'username',
							'label' => 'Username',
							'rules' => 'trim|numeric|unique[models\Customer.username]'
						 ),
					array(
							'field' => 'nama',
							'label' => 'Nama',
							'rules' => 'trim|required'
						 ),
					array(
							'field' => 'email',
							'label' => 'Email',
							'rules' => 'trim|required|valid_email|unique[models\Akun.email]'
						 ),
					array(
							'field' => 'telepon',
							'label' => 'Telepon',
							'rules' => 'numeric'
						 ),
					array(
							'field' => 'kodepos',
							'label' => 'Kode Pos',
							'rules' => 'numeric'
						 ),
					array(
							'field' => 'telepon_seluler',
							'label' => 'Telepon Seluler',
							'rules' => 'numeric'
						 ),
					array(
							'field' => 'fax',
							'label' => 'Fax',
							'rules' => 'numeric'
						 ),
					),
	'pelanggan_update' => array(
					array(
							'field' => 'nama',
							'label' => 'Nama',
							'rules' => 'required'
						 ),
					array(
							'field' => 'username',
							'label' => 'ID',
							'rules' => 'trim|required|numeric|unique_update[models\Customer.username]'
						 ),
					array(
							'field' => 'email',
							'label' => 'Email',
							'rules' => 'trim|required|valid_email|unique_update[models\Akun.email]'
						 ),
					array(
							'field' => 'telepon',
							'label' => 'Telepon',
							'rules' => 'numeric'
						 ),
					array(
							'field' => 'kodepos',
							'label' => 'Kode Pos',
							'rules' => 'numeric'
						 ),
					array(
							'field' => 'telepon_seluler',
							'label' => 'Telepon Seluler',
							'rules' => 'numeric'
						 ),
					array(
							'field' => 'fax',
							'label' => 'Fax',
							'rules' => 'numeric'
						 ),
					),
	'ganti_password' => array(
					array(
							'field' => 'password_lama',
							'label' => 'Password Lama',
							'rules' => 'required|password_match'
						 ),
					array(
							'field' => 'password_baru',
							'label' => 'Password Baru',
							'rules' => 'required|matches[password_confirm]'
						 ),
					array(
							'field' => 'password_confirm',
							'label' => 'Konfirmasi Password Baru',
							'rules' => 'required'
						 ),
					),
	'ganti_email' => array(
					array(
							'field' => 'email',
							'label' => 'Email',
							'rules' => 'required|unique[models\Akun.email]'
						 ),
					),
	'tambah_kunjungan' => array(
					array(
							'field' => 'customer',
							'label' => 'Customer',
							'rules' => 'unique_kunjungan'
						 ),
					),
	'kunjungan_update' => array(
					array(
							'field' => 'flex_id',
							'label' => 'ID',
							'rules' => 'unique_update[models\Kunjungan.flex_id]'
						 ),
					),
	'reset_password' => array(
					array(
							'field' => 'password_admin',
							'label' => 'Password Administrator',
							'rules' => 'required|password_match'
						 ),
					array(
							'field' => 'id_akun',
							'label' => 'ID Akun',
							'rules' => 'required|id_exists'
						 ),
					),
	);
?>
